<script setup lang="ts">
import { RouterView } from 'vue-router'
// import { Button as VanButton } from 'vant'
// import { useUserStore } from '@/storces/user'
// import { UserPwdLogin, getMyUser } from '@/services/user'
// import type { User } from '@/types/user'
// const store = useUserStore()

// const setData = () => {
//   store.setUserInfo({
//     token: '111',
//     id: '22',
//     avatar: '22',
//     mobile: 'ss',
//     account: 'hahahah',
//     likeNumber: 2333
//   })
// }

// 测试通过，响应拦截器成功和失败都是可以的
// const testLogin = async () => {
//   const data = {
//     mobile: '13230000001',
//     password: 'abc12345'
//   }
//   const res = await UserPwdLogin(data)
//   // console.log(res.data)
//   const store = useUserStore()
//   store.setUserInfo(res.data as User)
// }
// // 获取用户数据
// const testUserRequest = async () => {
//   const res = await getMyUser()
//   console.log('aaaa', res)
// }

// const testTokenPast = () => {}
</script>

<template>
  <!-- <header></header> -->
  <!-- <van-button type="primary">11</van-button>
  <van-button @click="setData">持久化</van-button>
  <van-button @click="testLogin">测试登录</van-button>
  <van-button @click="testUserRequest">测试用户请求</van-button>
  <van-button @click="testTokenPast">测试token过期</van-button> -->
  <RouterView />
</template>

<style scoped>
.van-button {
  margin: 30px;
  width: 70px;
}

a {
  color: var(--cp-text3);
}
</style>
